#include "dnsuffixwhoismappingdlg.h"

//#include <QHBoxLayout>

#include "tdomain.h"

DNSuffixWhoisMappingDlg::DNSuffixWhoisMappingDlg(QWidget *parent)
    : QDialog(parent)
{
    m_tDomain = static_cast<TDomain *>(QWidget::parentWidget());
    //qDebug()<<m_tDomain->m_dbMySql->m_mysqlConn;
    QHBoxLayout *hlayout = new QHBoxLayout(this);
    m_curdtemplate = new TableCURDTemplate(this);
    m_curdtemplate->setFilterControl(true,false,false,false);
    m_curdtemplate->m_sqlCols="id,domainsuffix,queryaddr,port ";
    m_curdtemplate->m_sqlWhere="";
    m_curdtemplate->m_sqlOrder=" order by domainsuffix";
    m_curdtemplate->m_sqlTable=" whois_query_addr";
    m_curdtemplate->m_columnWidth.append({10,20,50,10});//设置列宽
    m_curdtemplate->m_db = m_tDomain->m_dbMySql->m_mysqlConn;
    m_curdtemplate->m_pageSize =1500;
    QStringList sl;
    sl<<"ID"<<"域名后缀"<<"Whois服务地址"<<"端口";
    m_curdtemplate->m_strColsName=sl;
    hlayout->addWidget(m_curdtemplate);
    this->setLayout(hlayout);
    m_curdtemplate->initUi();
    m_curdtemplate->initModel();



}
DNSuffixWhoisMappingDlg::~DNSuffixWhoisMappingDlg()
{


}
